from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QApplication
import sys
from PyQt5 import QtGui
from ui.mainwindow import MainWindow
import os


if __name__ == "__main__":
    if hasattr(Qt, 'AA_EnableHighDpiScaling'):
        QApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True)
    if hasattr(Qt, 'AA_UseHighDpiPixmaps'):
        QApplication.setAttribute(Qt.AA_UseHighDpiPixmaps, True)

    app = QApplication(sys.argv)
    #print(QtGui.QFontDatabase.addApplicationFont('font/SourceHanSansCN-Regular.otf'))
    logwindow = MainWindow()
    logwindow.show()
    sys.exit(app.exec_())